<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>书籍列表</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- 引入 Bootstrap -->
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://www.layuicdn.com/layui-v2.6.8/css/layui.css"  media="all">
</head>
<body>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <div class="page-header">
                <h1>
                    <small>用户 —— 显示所有用户</small>
                    <a href="${pageContext.request.contextPath}/Admin/Menu" class="btn btn-danger" style="margin-left: 55%">退出</a>
                </h1>
            </div>
        </div>
    </div>
    <div class="row">
        <div class="col-md-4 column">
            <span class="glyphicon glyphicon-folder-open"></span>
            <a class="btn btn-primary" href="${pageContext.request.contextPath}/Admin/toAddUser">新增</a>
        </div>
    </div>
    <div class="row" >
        <div class="col-md-4 column">
            <form action="${pageContext.request.contextPath}/Admin/query1" method="post">
                <span class="glyphicon glyphicon-search"></span>
                <input type="text" placeholder="请输入用户编号" name="uid" >
                <button type="submit" class="btn btn-default" style="color: brown" >搜索</button>
            </form>
        </div>
    </div>
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>用户编号</th>
                    <th>用户名字</th>
                    <th>密码</th>
                    <th>性别</th>
                    <th>生日</th>
                    <th>VIP</th>
                    <th>黑名单</th>
                    <th>地址</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach var="user" items="${requestScope.get('list')}">
                    <tr>
                        <td>${user.getUid()}</td>
                        <td>${user.getUname()}</td>
                        <td>${user.getUpwd()}</td>
                        <td>${user.getUsex()}</td>
                        <td>${user.getUbir()}</td>
                        <td>${user.getVip()}</td>
                        <td>${user.getBlist()}</td>
                        <td>${user.getAddress()}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/Admin/toUpdateUser?uid=${user.getUid()}">更改</a> |
                            <a href="${pageContext.request.contextPath}/Admin/del/${user.getUid()}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>
</div>